package com.by.service.impl;

import com.by.bean.User;
import com.by.common.crud.BaseServiceImpl;
import com.by.mapper.UserMapper;
import com.by.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends BaseServiceImpl<User, UserMapper> implements UserService {
    /**
     * 根据账号查询账号是否存在保证员工账号的唯一性
     *
     * @param account 输入的账号
     * @return 1存在 0不存在
     */
    @Override
    public int queryUserByAccount(String account) {
        return baseMapper.queryUserByAccount(account);
    }

    @Override
    public int updateStatus(int id, int status) {
        return baseMapper.updateStatus(id, status);
    }

    @Override
    public User queryByAccount(String account) {
        return baseMapper.queryByAccount(account);
    }

//    @Override
//    public User userIdByAccount(String account) {
//        return baseMapper.userIdByAccount(account);
//    }
}
